/******************************************************************************
 * @File name   :      EmployeeMgntUtil.java
 *
 * @Author      :      Panxing Wu
 *
 * @Date        :      2011-6-28
 *
 * @Copyright Notice: 
 * Copyright (c) 2014 DMS, Inc. All  Rights Reserved.
 * This software is published under the terms of the DMS Software
 * License version 1.0, a copy of which has been included with this
 * distribution in the LICENSE.txt file.
 * 
 * 
 * ----------------------------------------------------------------------------
 * Date                   Who         Version        Comments
 * 2011-6-28 下午03:54:46        Panxing Wu     1.0            Initial Version
 *****************************************************************************/
package com.cap.bts.framework.dm.employeemgnt.utils;

import org.springframework.context.ApplicationContext;

import com.cap.bts.commonfunc.common.service.IUniqueCodeGenerateService;
import com.cap.bts.framework.common.exception.AppException;
import com.cap.bts.framework.common.util.ApplicationContextUtil;

/**
 *
 */

public class EmployeeMgntUtil {
    
    private static  IUniqueCodeGenerateService uniqueCodeGenerateService = null;
    static{
        ApplicationContext applicationContext = ApplicationContextUtil
        .getApplicationContext();
         uniqueCodeGenerateService = (IUniqueCodeGenerateService)applicationContext.getBean("uniqueCodeGenerateqService");
    }
    
    public static String createUserCode() throws AppException
    {
        String userCode = uniqueCodeGenerateService.generateUserCode();
        return userCode;
    }

    public static String createEmployeeCode() throws AppException{
        
        String employeeCode = uniqueCodeGenerateService.generateEmployeeCode();
        return employeeCode;
    }
   
}
